export class Hospital {
  id: string;
  hosname: string;
  hoscode: string;
  hostype: string;
  provinceCode: string;
  // 城市
  cityCode: string;
  // 区域
  districtCode: string;
  address: string;
  // 医院图片
  logoData: string;
  intro: string;
  route: string;
  // 状态
  status: number;
  param: {
    // 医院类型
    hostypeString: string;
    // 完整地址
    fullAddress: string;
  };
  // 创建时间
  createTime: string;
  // 更新时间
  updateTime: string;
  // 删除状态
  isDeleted: number;
  bookingRule: {
    cycle: number;
    // 放号时间
    releaseTime: string;
    // 停号时间
    stopTime: string;
    // 放号天数
    quitDay: number;
    quitTime: number;
  };
}

// 后端接口返回实体类
export class Result {
  code: number;
  message: string;
  data: any;
}

// 字典数据
export class DictData {
  "createTime": string;
  "dictCode": string;
  "hasChildren": boolean;
  "id": number;
  "isDeleted": number;
  "name": string;
  "parentId": number;
  "updateTime": string;
  "value": string;
}

/*
 * 搜索栏下拉框数据类型
 */
export class SearchSelectItem {
  value: string;
  link: string;

  constructor(value: string, link: string) {
    this.value = value;
    this.link = link;
  }
}

/*
 * 医院科室数据类型
 */
export class HospitalDepartment {
  depcode: string;
  depname: string;
  children?: HospitalDepartment[];
}

/*
  登录
 */
export interface LoginData {
  code: string;
  ip: string;
  openid: string;
  phone: string;
}

/*
  登录返回信息
 */
export interface userInfo {
  name: string;
  token: string;
}

/*
   某天科室预约信息
 */
export interface ReservationInfo {
  // 2024-06-28
  workDate: string;
  // 06月28日
  workDateMd: string;
  // 周几
  dayOfWeek: string;
  docCount: number;
  reservedNumber: number;
  // 可预约人数
  availableNumber: number;
  // 预约状态
  status: number;
}

/*
   某天预约信息
 */
export interface BaseMap {
  workDateString: string;
  releaseTime: string;
  bigname: string;
  // 停止预约时间
  stopTime: string;
  // 科室名称
  depname: string;
  // 医院名称
  hosname: string;
}

/*
   医院科室预约信息 返回
 */
export interface HospitalDepartmentReservationResult extends Result {
  data: {
    total: number;
    baseMap: BaseMap;
    bookingScheduleList: ReservationInfo[];
  };
}

// 排班
export interface Doctor {
  id: string;
  hoscode: string;
  depcode: string;
  title: string;
  docname: string;
  skill: string;
  workDate: string;
  workTime: number;
  reservedNumber: number;
  availableNumber: number;
  amount: number;
  status: number;
  hosScheduleId: string;
  param: {
    hosname: string;
    depname: string;
    dayOfWeek: string;
  };
}

export interface DoctorResult extends Result {
  data: Doctor[];
}

// 排班接口返回
export interface WorkingListResult extends Result {
  data: {
    workingList: Doctor[];
  };
}

// 就诊人
export interface VisitingUser {
  id: number;
  name: string;
  userId: number;
  certificatesType: string;
  certificatesNo: string;
  sex: number;
  birthdate: string;
  phone: string;
  isMarry: number;
  provinceCode: string;
  cityCode: string;
  districtCode: string;
  address: string;
  // 紧急联系人
  contactsName: string;
  contactsCertificatesType: string;
  contactsCertificatesNo: string;
  contactsPhone: string;
  isInsure: number;
  cardNo: string;
  status: number;
  param: {
    certificatesTypeString: string;
    contactsCertificatesTypeString: string;
    cityString: string;
    fullAddress: string;
    districtString: string;
    provinceString: string;
  };
}

export interface VisitingUserResult extends Result {
  data: VisitingUser[];
}

// 订单详情
export interface OrderInfo {
  id: string;
  createTime: string;
  updateTIme: string;
  isDeleted: string;
  param: {
    orderStatusString: string;
  };
  userId: number;
  outTradeNo: string;
  hoscode: string;
  hosname: string;
  depcode: string;
  depname: string;
  scheduleId: string;
  title: string;
  reserveDate: string;
  reserveTime: string;
  patientId: string;
  patientName: string;
  patientPhone: string;
  hosRecordId: string;
  number: string;
  fetchTime: string;
  fetchAddress: string;
  amount: number;
  quitTime: string;
  orderStatus: number;
}

// 支付信息
export interface PayInfo {
  codeUrl: string;
  orderId: number;
  totalFee: number;
  resultCode: string;
}

// 用户信息
export interface UserInfo {
  id: number;
  openid: string;
  nickName: string;
  phone: string;
  name: string;
  certificatesType: string;
  certificatesNo: string;
  certificatesUrl: string;
  // 认证状态
  authStatus: number;
  status: number;
}
